<me:UIVVT x:Class="WPFExcelReport.TVV03"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"     
                    xmlns:me="clr-namespace:WPFExcelReport" 
                    xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls" 
                    xmlns:VV="clr-namespace:WPFExcelReport;assembly=TVVLIEF"   
                    xmlns:WFW="clr-namespace:WPFExcelReport;assembly=TICC_WFEVENTS" 
                    xmlns:U="clr-namespace:WPFExcelReport;assembly=ITXUI" 
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization" 
                    x:Name="TV"
                    Loaded="Window_Loaded"
     >
    <me:UIVVT.Resources>
        <CollectionViewSource  x:Key="vwMaster" /> 
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:Divideby100  x:Key="d100"/> 
        <ucd:BM2YD x:Key="BM2YD"/>
        <ucd:Divideby1000  x:Key="d1000"/> 
        <ucd:PNumConverter  x:Key="pnum"/>
        <ucd:TextTrimmingConverter  x:Key="Trim"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
    </me:UIVVT.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="1*"></RowDefinition>
        </Grid.RowDefinitions>
        <WrapPanel Grid.Row="0"> 
                <TextBlock Text="{Binding Source={Localization:Translate Word=目标:}}" ></TextBlock>
                <ex:NumericBox  Text="{Binding VVTROHGEW,Converter={StaticResource d100}}" Width="60"/> 
            <Button Click="SaveCommand"    Height="24" Margin="20,0,0,0" Width="20" VerticalAlignment="Top" >
                <Button.Background>
                    <ImageBrush  ImageSource="/ImagePackage;component/Images/Save.png" />
                </Button.Background>
            </Button>
            <WFW:TBTWF Grid.Column="2"   Margin="10,0,0,0" 
                       IsInfo="False"
                        ART="MVVAPP"
                        EXAUF="{Binding WFORDER, ElementName=TV}"
                        INFO="提交"  
                      />
            <U:TNWFAPP ART="MVVAPP"
                       x:Name="cAudit" 
                       EXAUF="{Binding WFORDER,ElementName=TV}"  
                       />
            
        </WrapPanel>
        <WrapPanel Grid.Row="1">
            <TextBlock    Text="{Binding VVTANZSTK,Source={StaticResource vwMaster}}" Width="20"/>
            <TextBlock  Text="{Binding Source={Localization:Translate Word=匹}}"/> 
            <TextBlock    Text="{Binding VVTMTR,Source={StaticResource vwMaster},Converter={StaticResource d100}}" Width="40"/>
            <TextBlock  Text="{Binding Source={Localization:Translate Word=M}}"/>
            <TextBlock   Margin="5,0,0,0" Text="{Binding VVTMTR,Source={StaticResource vwMaster},Converter={StaticResource BM2YD}}" Width="40"/>
            <TextBlock  Text="{Binding Source={Localization:Translate Word=Y}}"/>
        </WrapPanel>
        <DataGrid  Grid.Row="2"  VerticalAlignment="Top"  MaxHeight="100"
               AutoGenerateColumns="False"
               EnableRowVirtualization="False"
               VerticalScrollBarVisibility="Auto"
               HorizontalScrollBarVisibility="Auto"
               HeadersVisibility="Column"     
               ItemsSource="{Binding Source={StaticResource ResourceKey=vwMaster}}"  
               IsSynchronizedWithCurrentItem="True" 
               x:Name="dlgMaster"  
               RowDetailsVisibilityMode="Visible" Grid.ColumnSpan="2" Margin="0,0.2,0.2,0"
            >
            <DataGrid.Columns> 
                <DataGridTextColumn Binding="{Binding Path=VVTLIEFSCH, Converter={StaticResource ResourceKey=pnum}}" Header="{Binding Source={Localization:Translate Word=发货单}}" Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=VVTROHGEW, Converter={StaticResource ResourceKey=d100}}" Header="{Binding Source={Localization:Translate Word=目标数}}" Width="60" />
                <DataGridTextColumn Binding="{Binding Path=VVTAUFKRS}"   Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=VVTAUFLFD, Converter={StaticResource ResourceKey=pnum} }"   Header="{Binding Source={Localization:Translate Word=销售单}}" Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=VVTAUFPOS, Converter={StaticResource ResourceKey=pnum}}" Width="Auto" /> 
                <DataGridTextColumn Binding="{Binding Path=VVTFDAT }"  Header="{Binding Source={Localization:Translate Word=日期}}" Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=VVTFZEIT}" Header="{Binding Source={Localization:Translate Word=时间}}" Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=VVTFBENID}" Header="{Binding Source={Localization:Translate Word=操作人}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=VVTKG, Converter={StaticResource ResourceKey=d100}}" Header="{Binding Source={Localization:Translate Word=KG}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=VVTMTR, Converter={StaticResource ResourceKey=d100}}"  Header="{Binding Source={Localization:Translate Word=M}}" Width="Auto" /> 
            </DataGrid.Columns>
        </DataGrid  > 
    </Grid>
</me:UIVVT> 
 
